import { searchVO } from "@/typings";
import requestWithToken from "@/utils/request";

export const createOrder = (data: any) => {
  return requestWithToken("/order/create", "POST", data);
};
export const payOrder = (id: string) => {
  return requestWithToken("/order/pay", "GET", { id });
};
export const confirmOrder = (id: string) => {
  return requestWithToken("/order/confirm", "GET", { id });
};
export const cancelOrder = (id: string) => {
  return requestWithToken("/order/cancel", "GET", { id });
};
export const listOrder = (data: searchVO) => {
  return requestWithToken("/order/list", "GET", data);
};
export const getOrder = (id: string) => {
  return requestWithToken("/order/get", "GET", { id });
};
export const ORDER_TYPE_LETTER = "寄信";
export const ORDER_TYPE_POSTCARD = "寄明信片";
export const ORDER_TYPE_PRODUCT = "寄商品";
